package spring_annotation.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import spring_annotation.service.HelloService;

@RestController
public class HelloController {

    @Autowired
    private HelloService helloService;

//    @ResponseBody
    @RequestMapping("/hello")
    public String sayHello(){

        return helloService.sayHello("CT");
    }
}
